<template>
  <view class="content">
        <view class="item padding" >
          <view class="flexrowspacebetween margin-bottom ">

              <text v-if="dataItem.msgType === 1" class="text-lg text-black">报警信息</text>
              <text v-if="dataItem.msgType === 2" class=" text-lg text-black">资费信息</text>
            <text class="item-title text-sm">{{dataItem.msgTime | dateFomatterYYYYMMDD}}</text>
          </view>
          <view class="item-line"></view>
          <view class="flexrowspacebetween padding-tb-xs" >
            <view class="" style="width: 100%">
              <text class="text-sm" >{{dataItem.content}}</text>
            </view>
          </view>
        </view>
  </view>
</template>
<script>
import dayjs from "dayjs";
export default {
  data() {
    return {
      dataItem: {},
    }
  },
  onLoad(query) {
    const {
      data
    } = query || {}
    this.dataItem = JSON.parse(data);
  },
  onReady(){
  },
  filters: {
    dateFomatterYYYYMMDD (date) {
      return date ? dayjs(date).format('YYYY-MM-DD HH:mm:ss') : ''
    }
  },
  computed: {},
  methods: {}
}
</script>

<style>
.item {
  background-color: #ffffff;
  flex-direction: column;
 display: flex;

  justify-content: space-between;
}

.item-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #eeeeee;
}
</style>
